package edu.lnu.ums.entities;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Faculty extends ScientificUnit {
    private static final long serialVersionUID = 1L;

    @ManyToOne(cascade=CascadeType.PERSIST)
    @JoinColumn
    private Deanery deanery;

    public Deanery getDeanery() {
        return deanery;
    }

    public void setDeanery(Deanery deanery) {
        this.deanery = deanery;
    }

    @Override
    public String toString() {
        return this.getFullName();
    }


}
